cmake_minimum_required(VERSION 3.10 FATAL_ERROR)

set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
project(bce_sdk VERSION "0.1.0")
set(CMAKE_CXX_STANDARD 11)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()


include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/bcesdk)

aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/auth SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/bos SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/bos/model SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/bos/request SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/bos/response SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/http SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/model SRC)
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src/util SRC)

add_library(${PROJECT_NAME} ${SRC})

target_link_libraries(${PROJECT_NAME}
        -Wl,--start-group
        ${CONAN_LIBS} ${DEVICE_LIBS}
        -Wl,--end-group)
install(TARGETS ${PROJECT_NAME}
        RUNTIME DESTINATION ./bin)
